
<%-- 
    Document   : micuenta
    Created on : 21-ago-2013, 0:03:05
    Author     : Carlos
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<script src="../js/livevalidation.js"></script>
<style type="text/css">
.errors {
	background-color:#FFCCCC;
	border:1px solid #CC0000;
	width:400px;
	margin-bottom:8px;
	text-align: center;
}
.errors li{ 
	list-style: none; 
}
</style>
<div id="contenido">
    <div class="fila">
        <div class="contenido_borde_izq">
            <div class="contenido_borde_der">
                <div class="columna_derecha">
                    <h3>MODIFICACION DE CUENTA</h3>
                    <s:if test="hasActionErrors()">
                        <div class="errors">
                                <s:actionerror/>
                        </div>
                    </s:if>
                    <div class="formulario">
                        <s:form action="modifyAccount" cssClass="form-horizontal" validate="true">
                            <div class="form-group">
                                <s:label for="inputNombre" cssClass="col-lg-4 control-label" value="Nombre"/>
                                <div class="col-lg-8">
                                    <s:textfield cssClass="form-control" id="inputNombre" placeholder="Nombre" name="usuario.nombre" readonly="true"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputApellidos" cssClass="col-lg-4 control-label" value="Apellidos"/>
                                <div class="col-lg-8">
                                    <s:textfield cssClass="form-control" id="inputApellidos" placeholder="Apellidos" name="usuario.apellidos" readonly="true"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputEmail" cssClass="col-lg-4 control-label" value="Email"/>
                                <div class="col-lg-8">
                                    <s:textfield cssClass="form-control" id="inputEmail" placeholder="Email" name="email"
                                    onchange="var inputEmail = new LiveValidation('inputEmail');
    								inputEmail.add(Validate.Presence, { failureMessage: \"Email obligatorio\" });
    								inputEmail.add( Validate.Email, { failureMessage: \"Email no válido\" });" maxlength="80"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputConfirmarEmail" cssClass="col-lg-4 control-label" value="Confirmar email"/>
                                <div class="col-lg-8">
                                    <s:textfield cssClass="form-control" id="inputConfirmarEmail" placeholder="Confirmar email" name="emailConfirm"
                                    onchange="var inputConfirmarEmail = new LiveValidation('inputConfirmarEmail'); 
                                    inputConfirmarEmail.add(Validate.Presence, { failureMessage: \"Confirmación de email obligatorio\" });
                                    inputConfirmarEmail.add(Validate.Confirmation, { match: 'inputEmail', failureMessage: \"No coinciden los emails\" } );"
                                    maxlength="80"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputNIF" cssClass="col-lg-4 control-label" value="NIF"/>
                                <div class="col-lg-8">
                                    <s:textfield cssClass="form-control" id="inputNIF" placeholder="NIF" name="usuario.nif" readonly="true"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputPassword" cssClass="col-lg-4 control-label" value="Contraseña"/>
                                <div class="col-lg-5">
                                    <s:password cssClass="form-control" id="inputPassword" placeholder="Contraseña" name="usuario.contrasena" showPassword="true" readonly="true"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputNuevaPassword" cssClass="col-lg-4 control-label" value="Nueva Contraseña"/>
                                <div class="col-lg-5">
                                    <s:password cssClass="form-control" id="inputNuevaPassword" placeholder="Nueva Contraseña" name="newPassword"
                                    onchange="var inputNuevaPassword = new LiveValidation('inputNuevaPassword');
                                    inputNuevaPassword.add( Validate.Length, { minimum: 4, maximum: 8,  tooShortMessage: \"Mínimo de 4 caracteres\", tooLongMessage: \"Máximo 8 caracteres\"} );"
                                    maxlength="8"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputRePassword" cssClass="col-lg-4 control-label" value="Confirmar Nueva Contraseña"/>
                                <div class="col-lg-5">
                                    <s:password cssClass="form-control" id="inputRePassword" placeholder="Confirmar Nueva Contraseña" name="newPassConfirm"
                                    onchange="var inputRePassword = new LiveValidation('inputRePassword'); 
                                    inputRePassword.add(Validate.Presence, { failureMessage: \"Confirmacion de contraseña obligatoria\" });
                                    inputRePassword.add(Validate.Confirmation, { match: 'inputNuevaPassword', failureMessage: \"No coinciden las contraseñas\" } );"
                                    maxlength="8"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="idPub" class="col-lg-4 control-label"> </label>
                                <div class="col-lg-8">
                                    <s:checkbox id="idPub" name="pubTerms"/> Quiero recibir notificaciones de LIWALO
                                </div>
                            </div>
                            <div class="form-group">
                                <s:label for="inputEnviar" cssClass="col-lg-4 control-label"/>
                                <div class="col-lg-5">
                                    <s:submit type="button" cssClass="btn  boton_envio">ENVIAR</s:submit>
                                </div>
                            </div>
                            <div class="form-group">
                            	<s:label for="inputCancelar" cssClass="col-lg-4 control-label"/>
                                <div class="col-lg-5">
                                    <s:a action="Account" cssClass="btn  boton_envio" cssStyle="top: -56px; left: 160px;">CANCELAR</s:a>
                                </div>
                            </div>
                        </s:form>
                    </div>
                </div>
            </div>
        </div>
        <div class="contenido_borde_abajo">
            <div class="esquina_izq"></div>
            <div class="esquina_der"></div>
        </div>
    </div>

    <div class="columna_izquierda">
        <div class="pestania">
            <div class="pestania_top"></div>
    		<s:a action="Inicio" title="Volver" cssClass="azul"><span class="bigger">VOLVER</span></s:a>
    		<div class="pestania_bottom"></div>
        </div>
    </div>
</div>